<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="./public/css/grid.css">
<title>{$title}</title>
<link href="./public/css/main.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" type="text/css" href="./public/css/form.css">
<link rel="stylesheet" type="text/css" href="./public/css/table.css">
</head>
<body class="bodyClass" style="height: 657px; width:98% ">
<div class="topBut">
<form id="form1" name="form1" method="get" action="">
      <select name="classid">
	  <option value="">所有</option>
	  {foreach from=$className item=item}
        <option value="{$item.id}" {if $smarty.get.classid eq {$item.id}} selected="selected" {/if}>{$item.className}</option>
	  {/foreach}
      </select>
      <input type="text" name="keyword" value="{$keyword}" />
	  <a class="button search-button" href="javascript:void(0)" onclick="tijiao()"><span>搜索</span></a>
</form>
</div>
<div id="admin-user-grid" class="grid-view">
  <table class="items">
    <thead>
      <tr>
        <th id="admin-user-grid_c0" width="5%">序号</th>
		<th id="admin-user-grid_c1" width="10%">类别</th>
        <th id="admin-user-grid_c1" width="30%">标题</th>
        <th id="admin-user-grid_c2" width="50%">简介</th>
		<th id="admin-user-grid_c2" width="5%">查看</th>
      </tr>
    </thead>
	{foreach from=$data item=item key=key}
    <tbody>
      <tr  class=" {if $key%2 eq 0 } odd {else} even {/if}" >
        <td><a href="?a=view&id={$item.id}" target="_blank">{$key+1}</td>
		<td>{$item.className|truncate:"30":"..." }</a></td>
        <td><a href="?a=view&id={$item.id}" target="_blank">{$item.title|truncate:"30":"..." }</a></td>
        <td>{$item.content|truncate:"80":"..." }</td>
		<td><a href="?a=view&id={$item.id}" target="_blank">查看</a></td>
      </tr>
	  {/foreach}
    </tbody>
  </table>
  <div class="page" style="float:right; margin-right:20px;">
    <div class="summary"> {$page} </div>
  </div>
  
</div>
<script language="javascript">
	function tijiao()
	{
		document.getElementById("form1").submit();
	}
</script>
</body>
</html>
